﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title></title>
  <!-- Bootstrap Styles-->
  <link rel="stylesheet" type="text/css" th:href="@{/static/assets/css/bootstrap.css}"/>
  <!-- FontAwesome Styles-->
  <link rel="stylesheet" type="text/css" th:href="@{/static/assets/css/font-awesome.css}"/>
  <!-- Custom Styles-->
  <link rel="stylesheet" type="text/css" th:href="@{/static/assets/css/custom-styles.css}"/>
  <!--time-->
  <link rel="stylesheet" type="text/css"
        th:href="@{/static/assets/bootstrap-datetime/bootstrap-datetimepicker.min.css}"/>
  <!-- Google Fonts-->
  <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
  <!-- TABLE STYLES-->
  <link th:href="@{/static/assets/js/dataTables/dataTables.bootstrap.css}" rel="stylesheet"/>
</head>
<body>
<div id="wrapper">
  <nav class="navbar navbar-default top-navbar" role="navigation">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse"
              data-target=".sidebar-collapse">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="index.do"><i class="fa fa-gear"></i>
        <strong>后台管理系统</strong></a>
    </div>

    <ul class="nav navbar-top-links navbar-right">
      <li class="dropdown">
        <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
          <i class="fa fa-envelope fa-fw"></i> <i class="fa fa-caret-down"></i>
        </a>
        <ul class="dropdown-menu dropdown-messages">
          <li>
            <a href="#">
              <div>
                <strong>John Doe</strong>
                <span class="pull-right text-muted">
                                        <em>Today</em>
                                    </span>
              </div>
              <div>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s...
              </div>
            </a>
          </li>
          <li class="divider"></li>
          <li>
            <a href="#">
              <div>
                <strong>John Smith</strong>
                <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
              </div>
              <div>Lorem Ipsum has been the industry's standard dummy text ever since an kwilnw...
              </div>
            </a>
          </li>
          <li class="divider"></li>
          <li>
            <a href="#">
              <div>
                <strong>John Smith</strong>
                <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
              </div>
              <div>Lorem Ipsum has been the industry's standard dummy text ever since the...</div>
            </a>
          </li>
          <li class="divider"></li>
          <li>
            <a class="text-center" href="#">
              <strong>Read All Messages</strong>
              <i class="fa fa-angle-right"></i>
            </a>
          </li>
        </ul>
        <!-- /.dropdown-messages -->
      </li>
      <!-- /.dropdown -->
      <li class="dropdown">
        <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
          <i class="fa fa-tasks fa-fw"></i> <i class="fa fa-caret-down"></i>
        </a>
        <ul class="dropdown-menu dropdown-tasks">
          <li>
            <a href="#">
              <div>
                <p>
                  <strong>Task 1</strong>
                  <span class="pull-right text-muted">60% Complete</span>
                </p>
                <div class="progress progress-striped active">
                  <div class="progress-bar progress-bar-success" role="progressbar"
                       aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
                    <span class="sr-only">60% Complete (success)</span>
                  </div>
                </div>
              </div>
            </a>
          </li>
          <li class="divider"></li>
          <li>
            <a href="#">
              <div>
                <p>
                  <strong>Task 2</strong>
                  <span class="pull-right text-muted">28% Complete</span>
                </p>
                <div class="progress progress-striped active">
                  <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="28"
                       aria-valuemin="0" aria-valuemax="100" style="width: 28%">
                    <span class="sr-only">28% Complete</span>
                  </div>
                </div>
              </div>
            </a>
          </li>
          <li class="divider"></li>
          <li>
            <a href="#">
              <div>
                <p>
                  <strong>Task 3</strong>
                  <span class="pull-right text-muted">60% Complete</span>
                </p>
                <div class="progress progress-striped active">
                  <div class="progress-bar progress-bar-warning" role="progressbar"
                       aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
                    <span class="sr-only">60% Complete (warning)</span>
                  </div>
                </div>
              </div>
            </a>
          </li>
          <li class="divider"></li>
          <li>
            <a href="#">
              <div>
                <p>
                  <strong>Task 4</strong>
                  <span class="pull-right text-muted">85% Complete</span>
                </p>
                <div class="progress progress-striped active">
                  <div class="progress-bar progress-bar-danger" role="progressbar"
                       aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 85%">
                    <span class="sr-only">85% Complete (danger)</span>
                  </div>
                </div>
              </div>
            </a>
          </li>
          <li class="divider"></li>
          <li>
            <a class="text-center" href="#">
              <strong>See All Tasks</strong>
              <i class="fa fa-angle-right"></i>
            </a>
          </li>
        </ul>
        <!-- /.dropdown-tasks -->
      </li>
      <!-- /.dropdown -->
      <li class="dropdown">
        <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
          <i class="fa fa-bell fa-fw"></i> <i class="fa fa-caret-down"></i>
        </a>
        <ul class="dropdown-menu dropdown-alerts">
          <li>
            <a href="#">
              <div>
                <i class="fa fa-comment fa-fw"></i> New Comment
                <span class="pull-right text-muted small">4 min</span>
              </div>
            </a>
          </li>
          <li class="divider"></li>
          <li>
            <a href="#">
              <div>
                <i class="fa fa-twitter fa-fw"></i> 3 New Followers
                <span class="pull-right text-muted small">12 min</span>
              </div>
            </a>
          </li>
          <li class="divider"></li>
          <li>
            <a href="#">
              <div>
                <i class="fa fa-envelope fa-fw"></i> Message Sent
                <span class="pull-right text-muted small">4 min</span>
              </div>
            </a>
          </li>
          <li class="divider"></li>
          <li>
            <a href="#">
              <div>
                <i class="fa fa-tasks fa-fw"></i> New Task
                <span class="pull-right text-muted small">4 min</span>
              </div>
            </a>
          </li>
          <li class="divider"></li>
          <li>
            <a href="#">
              <div>
                <i class="fa fa-upload fa-fw"></i> Server Rebooted
                <span class="pull-right text-muted small">4 min</span>
              </div>
            </a>
          </li>
          <li class="divider"></li>
          <li>
            <a class="text-center" href="#">
              <strong>See All Alerts</strong>
              <i class="fa fa-angle-right"></i>
            </a>
          </li>
        </ul>
        <!-- /.dropdown-alerts -->
      </li>
      <!-- /.dropdown -->
      <li class="dropdown">
        <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
          <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
        </a>
        <ul class="dropdown-menu dropdown-user">
          <li><a href="/manage/user//to_register.do"><i class="fa fa-sign-out fa-fw"></i> 用户注册</a>
          </li>
          <li><a href="/manage/user//to_login.do"><i class="fa fa-sign-out fa-fw"></i> 用户登录</a>
          </li>
          <li><a href="#"><i class="fa fa-user fa-fw"></i>用户概况</a>
          </li>
          <li><a href="#"><i class="fa fa-gear fa-fw"></i> 用户设置</a>
          </li>
          <li class="divider"></li>
          <li>
            <!--<a href="/manage/user/do_logout.do"><i class="fa fa-sign-out fa-fw"></i> 退出登录</a>-->
            <button type="button" id="logout" class="btn btn-default">退出登录</button>
          </li>
        </ul>
        <!-- /.dropdown-user -->
      </li>
      <!-- /.dropdown -->
    </ul>
  </nav>
  <!--/. NAV TOP  -->
  <nav class="navbar-default navbar-side" role="navigation">
    <div class="sidebar-collapse">
      <ul class="nav" id="main-menu">
        <li>
          <a  href="index.do"><i class="fa fa-dashboard"></i> 概览</a>
        </li>

        <li>
          <a class="active-menu" href="table.do"><i class="fa fa-table"></i> 店铺管理</a>
        </li>

        <li>
          <a href="/manage/buyer/to_list.do"><i class="fa fa-table"></i> 微客管理</a>
        </li>

        <li>
          <a href="/manage/task/to_list.do"><i class="fa fa-table"></i> 任务管理</a>
        </li>
        <li>
          <a href="/manage/money/to_list.do"><i class="fa fa-table"></i> 商家充值明细</a>
        </li>

        <li>
          <a  href="/manage/message/to_message.do"><i class="fa fa-table"></i> 公告管理</a>
        </li>

        <li>
          <a  href="/manage/user/to_list.do"><i class="fa fa-table"></i> 用户管理</a>
        </li>
       <!-- <li>
          <a href="ui-elements.do"><i class="fa fa-desktop"></i> UI图标</a>
        </li>
        <li>
          <a href="chart.do"><i class="fa fa-bar-chart-o"></i> 图形</a>
        </li>
        <li>
          <a href="tab-panel.do"><i class="fa fa-qrcode"></i> Tabs & Panels切换框</a>
        </li>

        <li>
          <a href="form.do"><i class="fa fa-edit"></i> Forms表单 </a>
        </li>-->


        <!--<li>
          <a href="#"><i class="fa fa-sitemap"></i> Multi-Level Dropdown<span
              class="fa arrow"></span></a>
          <ul class="nav nav-second-level">
            <li>
              <a href="#">Second Level Link</a>
            </li>
            <li>
              <a href="#">Second Level Link<span class="fa arrow"></span></a>
              <ul class="nav nav-third-level">
                <li>
                  <a href="#">Third Level Link</a>
                </li>
                <li>
                  <a href="#">Third Level Link</a>
                </li>
                <li>
                  <a href="#">Third Level Link</a>
                </li>

              </ul>

            </li>
          </ul>
        </li>
        <li>
          <a href="empty.html"><i class="fa fa-fw fa-file"></i> Empty Page</a>
        </li>-->
      </ul>
    </div>

  </nav>
  <!-- /. NAV SIDE  -->
  <div id="page-wrapper">
    <div id="page-inner">
      <div class="row">
        <div class="col-md-12">
          <h1 class="page-header">
            店铺管理</small>
          </h1>
        </div>
      </div>
      <!-- /. ROW  -->
      <div class="row">
        <div class="col-md-12">
          <!-- Advanced Tables -->
          <div class="panel panel-default">
            <div class="panel-heading">
            </div>
            <div class="panel-body">
              <div class="table-responsive">
                <table class="table table-striped table-bordered table-hover" id="dataTables">

                  <div class="form-group">
                    <label>店铺名称</label>
                    <input class="form-control" id="sName" placeholder="请输入店铺名称" name="shopName">
                    <label>旺旺id</label>
                    <input class="form-control" id="sWangwang" placeholder="请输入旺旺id"
                           name="wangwang">
                    <label>店铺id</label>
                    <input class="form-control" id="sShopId" placeholder="请输入店铺id" name="shopId">
                  </div>
                  <div class="form-group">
                    <label>商家手机号</label>
                    <input class="form-control" id="phoneNumber" placeholder="请输入商家手机号" name="phoneNumber">
                  </div>
                  <div>
                    <label>创建时间</label>
                    <a class='input-group date' id='datetimepicker1'
                       style="float: left; left: 320px;">
                      <input type='text' class="form-control" id='beginDate'
                             style="width: 150px; height: 30px;"/>
                      <span class="input-group-addon"
                            style="float: left; width: 50px; height: 30px;">
                        <span class="glyphicon glyphicon-calendar"></span>
                      </span>
                    </a>
                    <label>到</label>
                    <a class='input-group date' id='datetimepicker2'
                       style="float: left; left: 320px;">
                      <input type='text' class="form-control" id='endDate'
                             style="width: 150px; height: 30px;"/>
                      <span class="input-group-addon"
                            style="float: left; width: 50px; height: 30px;">
                        <span class="glyphicon glyphicon-calendar"></span>
                      </span>
                    </a>
                  </div>
                  <div>
                    <label>店铺状态</label>
                    <select id="queryOption" font-size="x-large"
                            data-live-search="true" th:align="center">
                      <option data-tokens="ketchup mustard" name="status" value="-1">全部</option>
                      <option data-tokens="ketchup mustard" name="status" value="0">待审核</option>
                      <option data-tokens="ketchup mustard" name="status" value="1">通过</option>
                      <option data-tokens="mustard" name="status" value="100">未通过</option>
                    </select>
                  </div>
                  <button type="button" id="submit_Serch" class="btn btn-default"><span
                      class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>搜索
                  </button>
                </table>
              </div>
            </div>
          </div>
          <!--End Advanced Tables -->
        </div>
      </div>

    </div>
    <!--弹框 start-->
    <form id="FormID">
      <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
           aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                  aria-hidden="true">&times;</span></button>
              <h4 class="modal-title" id="myModalLabel">店铺审核</h4>
            </div>
            <div class="modal-body">
              <div class="form-group" hidden="hidden">
                <input class="form-control" placeholder="shopId" name="shopId" id="shopId">
              </div>
              <div class="form-group" th:align="center">
                <label th:align="center">店铺审核</label>
                <select id="queryDevice" class="selectpicker" font-size="x-large"
                        data-live-search="true" th:align="center">
                  <option data-tokens="ketchup mustard" name="status" value="1">通过</option>
                  <option data-tokens="mustard" name="status" value="100">不通过</option>
                </select>
              </div>
              <div class="form-group" th:align="center">
                <label th:align="center">不通过原因</label>
                <select id="queryDevices" class="selectpicker" font-size="x-large"
                        data-live-search="true" th:align="center">
                  <option data-tokens="ketchup mustard" value="店铺后管截图不正确,请参照图例重选择">
                    店铺后管截图不正确，请参照图例重选择
                  </option>
                  <option data-tokens="mustard" value="店铺无商品">店铺无商品</option>
                  <option data-tokens="mustard" value="虚拟商品无法入住">虚拟商品无法入住</option>
                  <option data-tokens="mustard" value="店铺网址不正确,请重新提交">店铺网址不正确，请重新提交</option>
                  <option data-tokens="mustard" value="">自定义</option>
                </select>
              </div>
              <div class="form-group" th:align="center">
                <label>描述</label>
                <input type="text" name="desc" class="form-control" id="desc" placeholder="描述">
              </div>
            </div>
            <div class="modal-footer">
              <button type="button" id="btn_submit" class="btn btn-primary" data-dismiss="modal">
                <span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>确定
              </button>
              <button type="button" class="btn btn-default" data-dismiss="modal"><span
                  class="glyphicon glyphicon-remove" aria-hidden="true"></span>取消
              </button>
            </div>
          </div>
        </div>
      </div>
    </form>
    <!--弹框 end-->
    <footer><p>Copyright &copy; 2016.Company name All rights reserved.More Templates <a
        href="http://www.bao.com/" target="_blank" title="模板之家">模板之家</a> - Collect from <a
        href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a></p></footer>
  </div>
  <!-- /. PAGE INNER  -->
</div>
<!-- /. PAGE WRAPPER  -->
<!-- /. WRAPPER  -->
<!-- JS Scripts-->
<!-- jQuery Js -->
<script type="text/javascript" th:src="@{/static/assets/js/jquery-1.10.2.js}"></script>
<!-- Bootstrap Js -->
<script type="text/javascript" th:src="@{/static/assets/js/bootstrap.min.js}"></script>
<!-- Metis Menu Js -->
<script type="text/javascript" th:src="@{/static/assets/js/jquery.metisMenu.js}"></script>
<!-- DATA TABLE SCRIPTS -->
<script type="text/javascript" th:src="@{/static/assets/js/dataTables/jquery.dataTables.js}"></script>
<script type="text/javascript" th:src="@{/static/assets/js/dataTables/dataTables.bootstrap.js}"></script>
<script type="text/javascript"
        th:src="@{/static/assets/bootstrap-datetime/bootstrap-datetimepicker.min.js}"></script>
<script type="text/javascript"
        th:src="@{/static/assets/bootstrap-datetime/bootstrap-datetimepicker.zh-CN.js}"></script>
<script type="text/javascript"
        th:src="@{/static/assets/bootstrap-datetime/moment-with-locales.js}"></script>
<script type="text/javascript"
        th:src="@{/static/js/plugins/bootstrap-table/bootstrap-table.min.js}"></script>
<script type="text/javascript"
        th:src="@{/static/js/plugins/bootstrap-table/bootstrap-table-zh-CN.min.js}"></script>
<script>
  $(document).ready(function () {
    $('#dataTables').bootstrapTable({
      method: 'post',
      contentType: "application/x-www-form-urlencoded",
      url: "../manage/shop/lists.do",
      dataField: "data",
      pageNumber: 1, //初始化加载第一页，默认第一页
      pagination: true,//是否分页
      queryParamsType: 'limit',
      sidePagination: 'client',
      pageSize: 10,//单页记录数
      pageList: [5, 10, 20, 30],//分页步进值
      showRefresh: false,//刷新按钮
      showColumns: false,
      clickToSelect: true,//是否启用点击选中行
      toolbarAlign: 'right',
      buttonsAlign: 'right',//按钮对齐方式
      columns: [
        {
          title: '全选',
          field: 'select',
          checkbox: true,
          width: 25,
          align: 'center',
          valign: 'middle'
        },
        {
          title: '创建时间',
          field: 'createTime',
          sortable: true,
          formatter:function (value,row,index) {
            if(row.createTime == null){
              return '暂无创建时间';
            }else{
              var d = new Date(row.createTime);
              var createTime=d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate() + ' ' + d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds();
              return createTime;
            }
          }
        },
        {
          title: '店铺Id',
          field: 'shopId',
        },
        {
          title: '商家手机号',
          field: 'phoneNumber',
        },
        {
          title: '店铺状态',
          field: 'status',
          align: 'center',
          formatter: operateFormatter
        },
        {
          title: '平台',
          field: 'platformName',
          align: 'center',
        },
        {
          title: '店铺名称',
          field: 'shopName',
        },
        {
          title: 'wangwang',
          field: 'wangwang'
        },
        {
          title: '省',
          field: 'province',
          sortable: true
        },
        {
          title: '市',
          field: 'city',
          sortable: true
        },
        {
          title: '县',
          field: 'region',
          sortable: true
        },
        {
          title: '地址',
          field: 'address',
          sortable: true
        },
        {
          title: '截图',
          field: 'shopDesc',
          formatter:function (value,row,index) {
            if(row.shopDesc == null){
              return '暂无图片';
            }else{
              return '<img src="'+row.shopDesc+'" class="img-responsive" alt="Cinque Terre" width="40" height="40"> ';
            }
          }
        },
        {
          title: '客服手机号',
          field: 'servicePhoneNumber',
        },
        {
          title: '操作',
          align: 'center',
          events: operateEvents,
          formatter: operateFors
        }
      ],
      locale: 'zh-CN'//中文支持,
    });
  });

  function operateFormatter(value) {
    if (value == 0) {
      return '等待审核'
    } else if (value == 1) {
      return '审核通过'
    } else if (value == 2) {
      return '已缴费'
    } else if (value == 3) {
      return '账号过期'
    } else if (value == 100) {
      return '审核未通过'
    } else {
      return '数据错误'
    }
  }

  window.operateEvents = {
    'click #checkShop': function (e, value, row, index) {
      $("#myModalLabel").text("店铺审核");
      $('#myModal').modal();
      $("#shopId").val(row.shopId);
    }
  };

  function operateFors(value, row, index) {
    return [
      '<button type="button" id="checkShop" class="RoleOfdelete btn btn-primary  btn-sm" style="margin-right:15px;">审核</button>',
      '<button type="button" class="RoleOfedit btn btn-primary  btn-sm" style="margin-right:15px;">任务管理</button>',
      '<button type="button" class="RoleOfedit btn btn-primary  btn-sm" style="margin-right:15px;">订单管理</button>'
    ].join('');
  }
</script>

<script type="text/javascript">
  $(function () {
    var $btn = $("#btn_submit");
    $btn.on(
        "click", function () {
          $.ajax({
            url: "../manage/shop/updateShopStatus.do",
            data: {
              "shopId": $("#shopId").val(),
              "status": $("#queryDevice").val(),
              "shopNoPassReasons": $("#queryDevices").val()
            },
            dataType: "json",
            type: "post",
            success: function (data) {
              if (data.success == true) {
                alert("操作成功")
                location.reload();
              } else {
                alert("操作成功失败！")
              }
            }
          })
        })
  })
</script>
<script type="text/javascript">
  $(function () {
    var $btn = $("#submit_Serch");
    $btn.on(
        "click", function () {
          $.ajax({
            url: "../manage/shop/searchLists.do",
            data: {
              "shopName": $("#sName").val(),
              "wangwang": $("#sWangwang").val(),
              "shopId": $("#sShopId").val(),
              "phoneNumber": $("#phoneNumber").val(),
              "beginDate": $("#beginDate").val(),
              "endDate": $("#endDate").val(),
              "status": $("#queryOption").val()
            },
            dataType: "json",
            type: "post",
            success: function (data) {
              if (data.success == true) {
                $("#dataTables").bootstrapTable('load', data);//主要是要这种写法
              } else {
                alert("操作成功失败！")
              }
            }
          })
        })
  })
</script>
<script type="text/javascript">
  //设置日期时间控件
  $(function () {
    $('#datetimepicker1').datetimepicker({
      language: 'zh-CN',//显示中文
      format: 'yyyy-mm-dd',//显示格式
      minView: "month",//设置只显示到月份
      initialDate: new Date(),
      autoclose: true,//选中自动关闭
      todayBtn: true,//显示今日按钮
      locale: moment.locale('zh-cn')
    });
    //默认获取当前日期
    var today = new Date();
    var beginDate = (today.getFullYear()) + "-" + (today.getMonth() + 1) + "-" + today.getDate();
    //对日期格式进行处理
    var date = new Date(beginDate);
    var mon = date.getMonth() + 1;
    var day = date.getDate();
    var mydate = date.getFullYear() + "-" + (mon < 10 ? "0" + mon : mon) + "-" + (day < 10 ? "0"
        + day : day);
    document.getElementById("beginDate").value = mydate;
  })
</script>

<script type="text/javascript">
  //设置日期时间控件
  $(function () {
    $('#datetimepicker2').datetimepicker({
      language: 'zh-CN',//显示中文
      format: 'yyyy-mm-dd',//显示格式
      minView: "month",//设置只显示到月份
      initialDate: new Date(),
      autoclose: true,//选中自动关闭
      todayBtn: true,//显示今日按钮
      locale: moment.locale('zh-cn')
    });
    //默认获取当前日期
    var today = new Date();
    var endDate = (today.getFullYear()) + "-" + (today.getMonth() + 1) + "-" + today.getDate();
    //对日期格式进行处理
    var date = new Date(endDate);
    var mon = date.getMonth() + 1;
    var day = date.getDate();
    var mydate = date.getFullYear() + "-" + (mon < 10 ? "0" + mon : mon) + "-" + (day < 10 ? "0"
        + day : day);
    document.getElementById("endDate").value = mydate;
  })
</script>
<script type="text/javascript">
  $(function () {
    var $btn = $("#logout");
    $btn.on(
        "click", function () {
          $.ajax({
            url: "/manage/user/do_logout.do",
            data: {
            },
            dataType: "json",
            type: "post",
            success: function (data) {
              if (data.success == true) {
                window.location.href = "/index.do";
              } else {
                alert(data.msg)
              }
            }
          })
        })
  })
</script>
<!-- Custom Js -->
<script type="text/javascript" th:src="@{/assets/js/custom-scripts.js}"></script>
</body>
</html>
